package cn.steam.foo.util.lock;

import java.util.concurrent.TimeUnit;

/**
 * @author zhang jintao on 2022/05/19
 **/
public interface Lock {

    boolean tryLock(String key);

    boolean lock(String key);

    boolean lock(String key, int timeout, TimeUnit timeUnit);

    void unlock(String key);


}
